//
//  HHNetRequest.m
//  MacWeb
//
//  Created by 小贝 on 16/3/14.
//  Copyright © 2016年 Boye. All rights reserved.
//

#import "HHNetRequest.h"


@implementation HHNetRequest
+(void)requestWithGet:(NSString *)urlStr parmeter:(NSDictionary *)par successBlock:(ReturnValueBlock) successBlock failBlock:(FailedBlock)failBlock{
    AFHTTPSessionManager *session = [AFHTTPSessionManager manager];
    session.responseSerializer.acceptableContentTypes  = [NSSet setWithObjects:@"application/json", @"text/json", @"text/javascript",@"text/html", nil];
         [session GET:urlStr parameters:nil success:^(NSURLSessionDataTask * _Nonnull task, id  _Nonnull responseObject) {
        successBlock(responseObject);
        
    } failure:^(NSURLSessionDataTask * _Nonnull task, NSError * _Nonnull error) {
        failBlock(error);
    }];


}
@end
